// done
#pragma once
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#define LOG_BUFFER_SIZE 1024
class LogWriter {
 public:
  LogWriter(const char* filepath);
  ~LogWriter();
  bool writeTimestamp(const char* format, ...);
  bool write(const char* format, ...);

 private:
  int preMark(char* buffer);

 private:
  FILE* fp;
  char m_buffer[LOG_BUFFER_SIZE];
};
